<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Coverage Report</title>
<link title="Style" type="text/css" rel="stylesheet" href="css/main.css"/>
<script type="text/javascript" src="js/popup.js"></script>
</head>
<body>
<h5>Coverage Report - org.sakaiproject.genericdao.hibernate.HibernateGenericDao</h5>
<div class="separator">&nbsp;</div>
<table class="report">
<thead><tr>  <td class="heading">Classes in this File</td>  <td class="heading" width="20%"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Line Coverage</a></td>  <td class="heading" width="20%"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Branch Coverage</a></td>  <td class="heading" width="10%"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Complexity</a></td></tr></thead>
  <tr><td class="text"><a href="org.sakaiproject.genericdao.hibernate.HibernateGenericDao.html">HibernateGenericDao</a></td><td class="value"><table cellpadding="0" cellspacing="0" align="right"><tr><td>58%&nbsp;</td><td><table class="percentGraph" cellpadding="0" cellspacing="0" width="100"><tr><td class="covered" width="58"></td><td class="uncovered" width="41"></td></tr></table></td></tr></table></td><td class="value"><table cellpadding="0" cellspacing="0" align="right"><tr><td>70%&nbsp;</td><td><table class="percentGraph" cellpadding="0" cellspacing="0" width="100"><tr><td class="covered" width="70"></td><td class="uncovered" width="29"></td></tr></table></td></tr></table></td><td class="value"><span class="hidden">0.0;</span>0</td></tr>
</table>
<div class="separator">&nbsp;</div>
<table cellspacing="0" cellpadding="0" class="src">
<tr>
  <td class="numLine">&nbsp;1</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">/******************************************************************************</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;2</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * HibernateGenericDaoImpl.java - created by aaronz@vt.edu</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;3</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;4</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * Copyright (c) 2006 Aaron Zeckoski</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;5</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * Licensed under the Apache License, Version 2</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;6</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;7</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * A copy of the Apache License, Version 2 has been included in this </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;8</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * distribution and is available at: http://www.apache.org/licenses/LICENSE-2.0.txt</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;9</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;10</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * Contributors:</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;11</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * Aaron Zeckoski (aaronz@vt.edu) - Project Lead</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;12</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;13</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *****************************************************************************/</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;14</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;15</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">package</span> org.sakaiproject.genericdao.hibernate;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;16</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;17</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.io.Serializable;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;18</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.ArrayList;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;19</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Iterator;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;20</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.List;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;21</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Map;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;22</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Map.Entry;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;23</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.concurrent.ConcurrentHashMap;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;24</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;25</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.azeckoski.reflectutils.ClassLoaderUtils;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;26</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.azeckoski.reflectutils.ReflectUtils;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;27</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.hibernate.EntityMode;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;28</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.hibernate.Hibernate;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;29</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.hibernate.HibernateException;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;30</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.hibernate.Query;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;31</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.hibernate.metadata.ClassMetadata;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;32</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<span class="keyword">import</span> org.sakaiproject.genericdao.api.GenericDao;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;33</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.sakaiproject.genericdao.api.caching.CacheProvider;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;34</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.sakaiproject.genericdao.api.interceptors.DaoOperationInterceptor;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;35</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.sakaiproject.genericdao.api.interceptors.ReadInterceptor;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;36</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.sakaiproject.genericdao.api.interceptors.WriteInterceptor;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;37</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.sakaiproject.genericdao.api.search.Restriction;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;38</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.sakaiproject.genericdao.api.search.Search;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;39</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.sakaiproject.genericdao.base.caching.NonCachingCacheProvider;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;40</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;41</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.springframework.orm.hibernate3.support.HibernateDaoSupport;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;42</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;43</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;44</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * A Hibernate (http://hibernate.org/) based implementation of GenericDao</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;45</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * which can be extended to add more specialized DAO methods.</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;46</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;p&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;47</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * Note: This implementation is so simple it is unlikely to be useful</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;48</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * &lt;p&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;49</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * See the overview for installation/usage tips.</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;50</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;51</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * @author Aaron Zeckoski (aaronz@vt.edu)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;52</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;53</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">public</span> <span class="keyword">class</span> HibernateGenericDao <span class="keyword">extends</span> HibernateDaoSupport <span class="keyword">implements</span> GenericDao {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;54</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;55</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;   <span class="keyword">protected</span> <span class="keyword">static</span> String COUNTALL_QUERY = <span class="string">"select count(*) "</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;56</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;   <span class="keyword">protected</span> <span class="keyword">static</span> String START_QUERY = <span class="string">"from"</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;57</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;58</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;59</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Set the list of persistent classes that this DAO will handle&lt;br/&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;60</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * This no longer requires this to be set before the class initializes</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;61</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Do this using Spring like so:</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;62</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * &lt;xmp&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;63</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">      &lt;property name="persistentClasses"&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;64</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         &lt;list&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;65</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">            &lt;value&gt;org.sakaiproject.*yourappname*.model.*YourObject*&lt;/value&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;66</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         &lt;/list&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;67</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">      &lt;/property&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;68</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * &lt;/xmp&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;69</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param classes a list of Strings representing the</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;70</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * the fully qualified classpath and classname of persistent objects</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;71</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;72</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">public</span> <span class="keyword">void</span> setPersistentClasses(List&lt;String&gt; classes) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;73</td>
  <td class="nbHitsCovered">&nbsp;7</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (classes.size() == 0) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;74</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;         <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"persistent class list must have at least one item"</span>);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;75</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;76</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      List&lt;Class&lt;?&gt;&gt; classList = <span class="keyword">new</span> ArrayList&lt;Class&lt;?&gt;&gt;();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;77</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">for</span> (Iterator&lt;String&gt; i = classes.iterator(); i.hasNext();) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;78</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;         String className = i.next();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;79</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;         Class&lt;?&gt; c = ClassLoaderUtils.getClassFromString(className);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;80</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;         <span class="keyword">if</span> (c == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;81</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;82</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                  <span class="string">"Invalid class type in list of persistent classes: "</span> + className);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;83</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;84</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;         classList.add(c);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;85</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;86</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">this</span>.classes = classList;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;87</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;88</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;89</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;90</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;91</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Take a list of persistent hibernate objects and return non-persistent clones</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;92</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param items a list of persistent objects</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;93</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @return a list of non-persistent cloned objects</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;94</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;95</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> &lt;T&gt; List&lt;T&gt; cloneList(List&lt;T&gt; items) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;96</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">if</span> (items.isEmpty()) { <span class="keyword">return</span> items; }</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;97</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      List&lt;T&gt; clonedItems = <span class="keyword">new</span> ArrayList&lt;T&gt;();</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;98</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">for</span> (T item : items) {</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;99</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         <span class="comment">// create a clone of each hibernate object and pass back the clone only,</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;100</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         <span class="comment">// cloning only the bottom level of data</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;101</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         clonedItems.add( ReflectUtils.getInstance().clone(item, 0, <span class="keyword">null</span>) );</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;102</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;103</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">return</span> clonedItems;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;104</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;105</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;106</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/*</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;107</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Add some convenience methods here</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;108</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;109</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;110</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;111</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * This is a convenience method that DAO writers can use to do counts using any HQL,</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;112</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * it is efficient in that it does not return all objects and only does the count</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;113</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;114</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param hqlQuery any Hibernate HQL query of the format "from Blah..." or "select thing from Blah..."</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;115</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @return the number of items that would have been returned</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;116</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;117</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> <span class="keyword">int</span> count(String hqlQuery) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;118</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      String newHqlQuery = buildCountHQL(hqlQuery);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;119</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">return</span> ((Number) getHibernateTemplate().iterate(newHqlQuery).next()).intValue();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;120</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;121</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;122</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;123</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * This is a convenience method that DAO writers can use to do counts using any HQL,</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;124</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * it is efficient in that it does not return all objects and only does the count</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;125</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;126</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param hqlQuery any Hibernate HQL query of the format "from Blah..." or "select thing from Blah..."</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;127</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param params an array of values which are represented as "?" in the hql</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;128</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @return the number of items that would have been returned</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;129</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;130</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> <span class="keyword">int</span> count(String hqlQuery, Object[] params) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;131</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      String newHqlQuery = buildCountHQL(hqlQuery);</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;132</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">return</span> ((Number) getHibernateTemplate().iterate(newHqlQuery, params).next()).intValue();</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;133</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;134</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;135</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;136</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Builds count HQL from an HQL query</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;137</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;138</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param hqlQuery an hql query</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;139</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @return the HQL to do a count</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;140</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;141</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">private</span> String buildCountHQL(String hqlQuery) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;142</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (hqlQuery == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;143</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"hqlQuery cannot be null"</span>);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;144</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;145</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      hqlQuery = hqlQuery.trim();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;146</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;147</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      <span class="comment">// clean HQL up in case it looks like this: select blah from Blah</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;148</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">int</span> fromLoc = hqlQuery.indexOf(START_QUERY);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;149</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (fromLoc == -1) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;150</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"HQL appears to be invalid: "</span></span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;151</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;               + <span class="string">"query does not start with the string: "</span> + START_QUERY);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;152</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;153</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;154</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      <span class="comment">// get rid of the sort by since this will cause the count query to fail</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;155</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">int</span> sortLoc = hqlQuery.indexOf(<span class="string">"sort by"</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;156</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (sortLoc == -1) { sortLoc = hqlQuery.length(); }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;157</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;158</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;159</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      String newHqlQuery = hqlQuery.substring(fromLoc, sortLoc);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;160</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (fromLoc == 0) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;161</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;         newHqlQuery = COUNTALL_QUERY + newHqlQuery;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;162</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;163</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         <span class="comment">// make sure we keep the "blah" part and just put count() around it: select count(blah) from Blah</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;164</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         String oldPrefix = hqlQuery.substring(0, fromLoc);</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;165</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         String[] parts = oldPrefix.split(<span class="string">" "</span>);</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;166</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         <span class="keyword">if</span> (parts.length &gt; 1) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;167</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            String prefix = <span class="string">"select count("</span> + parts[1] + <span class="string">") "</span>;</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;168</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            newHqlQuery = prefix + newHqlQuery;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;169</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;170</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;171</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">return</span> newHqlQuery;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;172</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;173</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;174</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;175</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;176</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Generates the HQL snippet needed to represent this property/comparison/value triple,</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;177</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * will turn the value into a string, use {@link #makeComparisonHQL(Map, String, int, Object)}</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;178</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * if you want to deliver the object directly</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;179</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;180</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param property the name of the entity property</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;181</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param comparisonConstant the comparison constant (e.g. EQUALS)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;182</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param value the value to compare the property to</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;183</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @return a string representing the HQL snippet (e.g. propA = 'apple')</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;184</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;185</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> String makeComparisonHQL(String property, <span class="keyword">int</span> comparisonConstant, Object value) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;186</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      String sval = <span class="keyword">null</span>;</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;187</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">if</span> (comparisonConstant != Restriction.NOT_NULL &amp;&amp; comparisonConstant != Restriction.NULL) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;188</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         <span class="keyword">if</span> (value.getClass().isAssignableFrom(Boolean.<span class="keyword">class</span>) </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;189</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;               || value.getClass().isAssignableFrom(Number.<span class="keyword">class</span>)) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;190</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// special handling for boolean and numbers</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;191</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            sval = value.toString();</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;192</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;193</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            sval = <span class="string">"'"</span> + value.toString() + <span class="string">"'"</span>;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;194</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;195</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;196</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">return</span> buildComparisonHQL(property, comparisonConstant, sval);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;197</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;198</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;199</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;200</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param params a set of params to add this value to</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;201</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param property the name of the entity property</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;202</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param comparisonConstant the comparison constant (e.g. EQUALS)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;203</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param value the value to compare the property to</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;204</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @return a string representing the HQL snippet (e.g. propA = :propA)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;205</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;206</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> String makeComparisonHQL(Map&lt;String, Object&gt; params, String property, <span class="keyword">int</span> comparisonConstant, Object value) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;207</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">if</span> (comparisonConstant != Restriction.NOT_NULL &amp;&amp; comparisonConstant != Restriction.NULL) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;208</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         params.put(property, value);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;209</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;210</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">return</span> buildComparisonHQL(property, comparisonConstant, <span class="string">":"</span> + property);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;211</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;212</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;213</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;214</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param property</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;215</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param comparisonConstant</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;216</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param sval</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;217</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @return</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;218</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;219</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">private</span> String buildComparisonHQL(String property, <span class="keyword">int</span> comparisonConstant, String sval) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;220</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">switch</span> (comparisonConstant) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;221</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">case</span> Restriction.EQUALS:      <span class="keyword">return</span> property + <span class="string">" = "</span> + sval;</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;222</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">case</span> Restriction.GREATER:     <span class="keyword">return</span> property + <span class="string">" &gt; "</span> + sval;</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;223</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">case</span> Restriction.LESS:        <span class="keyword">return</span> property + <span class="string">" &lt; "</span> + sval;</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;224</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">case</span> Restriction.LIKE:        <span class="keyword">return</span> property + <span class="string">" like "</span> + sval;</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;225</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">case</span> Restriction.NOT_EQUALS:  <span class="keyword">return</span> property + <span class="string">" &lt;&gt; "</span> + sval;</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;226</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">case</span> Restriction.NOT_NULL:    <span class="keyword">return</span> property + <span class="string">" is not null"</span>;</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;227</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">case</span> Restriction.NULL:        <span class="keyword">return</span> property + <span class="string">" is null"</span>;</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;228</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">default</span>: <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"Invalid comparison constant: "</span> + comparisonConstant);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;229</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;230</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;231</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;232</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;233</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;234</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Provides an easy way to execute an HQL query with ? params</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;235</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;236</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param hql a hibernate query language query</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;237</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param params an array of values (you should have "?" in your HQL whereever the values will be inserted)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;238</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param start the entry number to start on (based on current sort rules), first entry is 0</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;239</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param limit the maximum number of entries to return, 0 returns as many entries as possible</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;240</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @return a list of whatever you requested in the HQL</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;241</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;242</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> List&lt;?&gt; executeHqlQuery(String hql, Object[] params, <span class="keyword">int</span> start, <span class="keyword">int</span> limit) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;243</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      Query query = getSession().createQuery(hql);</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;244</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      query.setFirstResult(start);</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;245</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">if</span> (limit &gt; 0) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;246</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         query.setMaxResults(limit);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;247</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;248</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i &lt; params.length; i++) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;249</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         query.setParameter(i, params[i]);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;250</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;251</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">return</span> query.list();</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;252</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;253</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;254</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;255</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Provides an easy way to execute an HQL query with named parameters</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;256</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;257</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param hql a hibernate query language query</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;258</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param params the map of named parameters</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;259</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param start the entry number to start on (based on current sort rules), first entry is 0</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;260</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param limit the maximum number of entries to return, 0 returns as many entries as possible</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;261</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @return a list of whatever you requested in the HQL</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;262</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;263</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> List&lt;?&gt; executeHqlQuery(String hql, Map&lt;String, Object&gt; params, <span class="keyword">int</span> start, <span class="keyword">int</span> limit) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;264</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      Query query = getSession().createQuery(hql);</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;265</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      query.setFirstResult(start);</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;266</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">if</span> (limit &gt; 0) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;267</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         query.setMaxResults(limit);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;268</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;269</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      setParameters(query, params);</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;270</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">return</span> query.list();</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;271</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;272</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;273</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;274</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * This is supported natively in Hibernate 3.2.x and up&lt;br/&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;275</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * sets the parameters correctly for hibernate 3.1</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;276</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;277</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param query</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;278</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param params</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;279</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;280</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> <span class="keyword">void</span> setParameters(Query query, Map&lt;String, Object&gt; params) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;281</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">for</span> (Entry&lt;String, Object&gt; entry : params.entrySet()) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;282</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         String name = entry.getKey();</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;283</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         Object param = entry.getValue();</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;284</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         <span class="keyword">if</span> (param.getClass().isArray()) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;285</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            query.setParameterList(name, (Object[]) param);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;286</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;287</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            query.setParameter(name, param);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;288</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;289</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      }</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;290</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   }</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;291</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;292</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;293</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/* (non-Javadoc)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;294</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @see org.sakaiproject.genericdao.api.GenericDao#getIdProperty(java.lang.Class)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;295</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;296</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">public</span> String getIdProperty(Class&lt;?&gt; entityClass) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;297</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;      ClassMetadata classmeta = getSessionFactory().getClassMetadata(entityClass);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;298</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (classmeta == <span class="keyword">null</span>) <span class="keyword">return</span> <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;299</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">return</span> classmeta.getIdentifierPropertyName();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;300</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;301</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;302</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">// OVERRIDES</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;303</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;304</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;305</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Use hibernate metadata to get the id value</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;306</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;307</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> Serializable baseGetIdValue(Object object) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;308</td>
  <td class="nbHitsCovered">&nbsp;155</td>
  <td class="src"><pre class="src">&nbsp;      Class&lt;?&gt; type = findClass(object);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;309</td>
  <td class="nbHitsCovered">&nbsp;154</td>
  <td class="src"><pre class="src">&nbsp;      Serializable idValue = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;310</td>
  <td class="nbHitsCovered">&nbsp;154</td>
  <td class="src"><pre class="src">&nbsp;      ClassMetadata classmeta = getSessionFactory().getClassMetadata(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;311</td>
  <td class="nbHitsCovered">&nbsp;154</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (classmeta != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;312</td>
  <td class="nbHitsCovered">&nbsp;154</td>
  <td class="src"><pre class="src">&nbsp;         <span class="keyword">if</span> (classmeta.hasIdentifierProperty()) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;313</td>
  <td class="nbHitsCovered">&nbsp;154</td>
  <td class="src"><pre class="src">&nbsp;            idValue = classmeta.getIdentifier(object, EntityMode.POJO);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;314</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;315</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;316</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"Could not get classmetadata for this object, it may not be persistent: "</span> + object);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;317</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;318</td>
  <td class="nbHitsCovered">&nbsp;154</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">return</span> idValue;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;319</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;320</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;321</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;322</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * MUST be overridden</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;323</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;324</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   @SuppressWarnings(<span class="string">"unchecked"</span>)</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;325</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> &lt;T&gt; T baseFindById(Class&lt;T&gt; type, Serializable id) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;326</td>
  <td class="nbHitsCovered">&nbsp;39</td>
  <td class="src"><pre class="src">&nbsp;      T entity = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;327</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">try</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;328</td>
  <td class="nbHitsCovered">&nbsp;39</td>
  <td class="src"><pre class="src">&nbsp;         entity = (T) getHibernateTemplate().get(type, id);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;329</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      } <span class="keyword">catch</span> (HibernateObjectRetrievalFailureException e) {</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;330</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         <span class="comment">// TODO - maybe log an error here or take this out later</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;331</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         <span class="comment">// if they fix the get to not throw a nasty error</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;332</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         entity = <span class="keyword">null</span>;</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;333</td>
  <td class="nbHitsCovered">&nbsp;39</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;334</td>
  <td class="nbHitsCovered">&nbsp;39</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">return</span> entity;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;335</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;336</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;337</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;338</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * MUST be overridden</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;339</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;340</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> Serializable baseCreate(Class&lt;?&gt; type, Object object) {</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;341</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      <span class="comment">// this ugly but hibernate will save an object which is already persistent so we have to do this check up front</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;342</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      Serializable id;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;343</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">try</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;344</td>
  <td class="nbHitsCovered">&nbsp;354</td>
  <td class="src"><pre class="src">&nbsp;         id = getSession().getIdentifier(object);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;345</td>
  <td class="nbHitsCovered">&nbsp;353</td>
  <td class="src"><pre class="src">&nbsp;      } <span class="keyword">catch</span> (HibernateException e) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;346</td>
  <td class="nbHitsCovered">&nbsp;353</td>
  <td class="src"><pre class="src">&nbsp;         id = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;347</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;348</td>
  <td class="nbHitsCovered">&nbsp;354</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (id != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;349</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;         <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"This object is already persistent with id: "</span> + id </pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;350</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;               + <span class="string">" - you must use update to save this object and not create"</span>);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;351</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;352</td>
  <td class="nbHitsCovered">&nbsp;353</td>
  <td class="src"><pre class="src">&nbsp;      id = getHibernateTemplate().save(object);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;353</td>
  <td class="nbHitsCovered">&nbsp;353</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">return</span> id;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;354</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;355</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;356</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;357</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * MUST be overridden</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;358</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;359</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> <span class="keyword">void</span> baseUpdate(Class&lt;?&gt; type, Object id, Object object) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;360</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      getHibernateTemplate().update(object);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;361</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;362</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;363</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;364</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * MUST be overridden</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;365</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;366</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> &lt;T&gt; <span class="keyword">boolean</span> baseDelete(Class&lt;T&gt; type, Serializable id) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;367</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">boolean</span> deleted = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;368</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      Object object = baseFindById(type, id);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;369</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (object != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;370</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;         getHibernateTemplate().delete(object);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;371</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;         deleted = <span class="keyword">true</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;372</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;373</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">return</span> deleted;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;374</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">/** This will not flush the item from the session so it is hopeless -AZ</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;375</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">      String query = "delete from " + type.getName() + " where " </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;376</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">            + getIdProperty(type) + "= ?";</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;377</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">      int i = getHibernateTemplate().bulkUpdate(query, id);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;378</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">      boolean deleted = false;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;379</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">      if (i &gt; 0) {</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;380</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         getSessionFactory().evict(type, id); //evict this item from the cache</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;381</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">         deleted = true;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;382</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">      }</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;383</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">      return deleted;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;384</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">**/</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;385</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;386</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;387</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;388</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Find the class type of a persistent object,</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;389</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * needed in the case that we are working with something that wraps it's objects&lt;br/&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;390</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Override this if desired</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;391</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param entity a persistent entity</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;392</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @return the persistent class type OR null if it cannot be found</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;393</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;394</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> Class&lt;?&gt; findClass(Object entity) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;395</td>
  <td class="nbHitsCovered">&nbsp;552</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (entity == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;396</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;         <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"Cannot find class type of null entity object"</span>);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;397</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;398</td>
  <td class="nbHitsCovered">&nbsp;550</td>
  <td class="src"><pre class="src">&nbsp;      Class&lt;?&gt; type = Hibernate.getClass(entity);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;399</td>
  <td class="nbHitsCovered">&nbsp;550</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">return</span> type;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;400</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;401</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;402</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">// COMMON CODE</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;403</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;404</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="keyword">private</span> List&lt;Class&lt;?&gt;&gt; classes;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;405</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;406</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * This does a nice bit of exception handling for us and verifies that</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;407</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * this class is valid to perform a DAO operation with</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;408</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param type class type of the persistent object to check</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;409</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @return A valid entityClass type resolved to be the same as</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;410</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * the ones usable by this DAO</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;411</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;412</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> Class&lt;?&gt; checkClass(Class&lt;?&gt; type) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;413</td>
  <td class="nbHitsCovered">&nbsp;528</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (type == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;414</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         <span class="keyword">throw</span> <span class="keyword">new</span> NullPointerException(<span class="string">"type cannot be null"</span>);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;415</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;416</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;417</td>
  <td class="nbHitsCovered">&nbsp;528</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (classes == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;418</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         <span class="keyword">throw</span> <span class="keyword">new</span> NullPointerException(<span class="string">"persistent classes must be set"</span>);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;419</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;420</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;421</td>
  <td class="nbHitsCovered">&nbsp;528</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">for</span> (Iterator&lt;Class&lt;?&gt;&gt; i = classes.iterator(); i.hasNext();) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;422</td>
  <td class="nbHitsCovered">&nbsp;635</td>
  <td class="src"><pre class="src">&nbsp;         Class&lt;?&gt; concrete = (Class&lt;?&gt;) i.next();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;423</td>
  <td class="nbHitsCovered">&nbsp;635</td>
  <td class="src"><pre class="src">&nbsp;         <span class="keyword">if</span> (concrete.isAssignableFrom(type)) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;424</td>
  <td class="nbHitsCovered">&nbsp;520</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> concrete;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;425</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;426</td>
  <td class="nbHitsCovered">&nbsp;115</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;427</td>
  <td class="nbHitsCovered">&nbsp;8</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"Could not resolve this class "</span> + </pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;428</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            type + <span class="string">" as part of the set of persistent objects: "</span> +</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;429</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            classes.toString());</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;430</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;431</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;432</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="keyword">private</span> CacheProvider cacheProvider;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;433</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;434</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @return the current cache provider</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;435</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;436</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> CacheProvider getCacheProvider() {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;437</td>
  <td class="nbHitsCovered">&nbsp;616</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (cacheProvider == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;438</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;         cacheProvider = <span class="keyword">new</span> NonCachingCacheProvider();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;439</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;440</td>
  <td class="nbHitsCovered">&nbsp;616</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">return</span> cacheProvider;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;441</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;442</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;443</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Set the cache provider to an implementation of {@link CacheProvider},</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;444</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * this will be set to {@link NonCachingCacheProvider} if this is not set explicitly</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;445</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param cacheProvider</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;446</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;447</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">public</span> <span class="keyword">void</span> setCacheProvider(CacheProvider cacheProvider) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;448</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">this</span>.cacheProvider = cacheProvider;</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;449</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   }</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;450</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;451</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @return the cache name used for storing this type of persistent object</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;452</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;453</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> String getCacheName(Class&lt;?&gt; type) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;454</td>
  <td class="nbHitsCovered">&nbsp;74</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (type == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;455</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"type cannot be null"</span>);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;456</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;457</td>
  <td class="nbHitsCovered">&nbsp;74</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">return</span> type.getName();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;458</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;459</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;460</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @return the cachename used for storing search results for this type of object</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;461</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;462</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> String getSearchCacheName(Class&lt;?&gt; type) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;463</td>
  <td class="nbHitsCovered">&nbsp;423</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (type == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;464</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"type cannot be null"</span>);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;465</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;466</td>
  <td class="nbHitsCovered">&nbsp;423</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">return</span> <span class="string">"search:"</span> + type.getName();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;467</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;468</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;469</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Creates all the caches for the current set of persistent types,</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;470</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * this should be called in the init for the generic dao being used after persistent classes are loaded</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;471</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;472</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> <span class="keyword">void</span> initCaches() {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;473</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">for</span> (Class&lt;?&gt; type : classes) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;474</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         getCacheProvider().createCache(getCacheName(type));</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;475</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         getCacheProvider().createCache(getSearchCacheName(type));</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;476</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;477</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   }</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;478</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;479</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">// INTERCEPTOR methods</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;480</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;481</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;   <span class="keyword">private</span> Map&lt;Class&lt;?&gt;, ReadInterceptor&gt; readInterceptors = <span class="keyword">new</span> ConcurrentHashMap&lt;Class&lt;?&gt;, ReadInterceptor&gt;();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;482</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;   <span class="keyword">private</span> Map&lt;Class&lt;?&gt;, WriteInterceptor&gt; writeInterceptors = <span class="keyword">new</span> ConcurrentHashMap&lt;Class&lt;?&gt;, WriteInterceptor&gt;();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;483</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;484</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Adds the provided interceptor to the current set of interceptors</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;485</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param interceptor</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;486</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;487</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">public</span> <span class="keyword">void</span> addInterceptor(DaoOperationInterceptor interceptor) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;488</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (interceptor != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;489</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;         Class&lt;?&gt; type = interceptor.interceptType();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;490</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;         <span class="keyword">if</span> (type != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;491</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">if</span> (ReadInterceptor.<span class="keyword">class</span>.isAssignableFrom(interceptor.getClass())) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;492</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;               readInterceptors.put(type, (ReadInterceptor) interceptor);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;493</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;494</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">if</span> (WriteInterceptor.<span class="keyword">class</span>.isAssignableFrom(interceptor.getClass())) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;495</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;               writeInterceptors.put(type, (WriteInterceptor) interceptor);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;496</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;497</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;498</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;499</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;500</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;501</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Removes the provided interceptor from the current set of interceptors</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;502</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param interceptor</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;503</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;504</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">public</span> <span class="keyword">void</span> removeInterceptor(DaoOperationInterceptor interceptor) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;505</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      <span class="keyword">if</span> (interceptor != <span class="keyword">null</span>) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;506</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         Class&lt;?&gt; type = interceptor.interceptType();</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;507</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         <span class="keyword">if</span> (type != <span class="keyword">null</span>) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;508</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">if</span> (ReadInterceptor.<span class="keyword">class</span>.isAssignableFrom(interceptor.getClass())) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;509</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;               readInterceptors.remove(type);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;510</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;511</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">if</span> (WriteInterceptor.<span class="keyword">class</span>.isAssignableFrom(interceptor.getClass())) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;512</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;               writeInterceptors.remove(type);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;513</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;514</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;515</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;516</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   }</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;517</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;518</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * Makes the given interceptor the only active interceptor,</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;519</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * removes all others and adds only this one</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;520</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @param interceptor</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;521</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;522</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">public</span> <span class="keyword">void</span> setInterceptor(DaoOperationInterceptor interceptor) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;523</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (interceptor != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;524</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;         readInterceptors.clear();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;525</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;         writeInterceptors.clear();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;526</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;         addInterceptor(interceptor);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;527</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;528</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;529</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;530</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> <span class="keyword">void</span> beforeRead(String operation, Class&lt;?&gt; type, Serializable[] ids, Search search) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;531</td>
  <td class="nbHitsCovered">&nbsp;49</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (type != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;532</td>
  <td class="nbHitsCovered">&nbsp;49</td>
  <td class="src"><pre class="src">&nbsp;         ReadInterceptor interceptor = readInterceptors.get(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;533</td>
  <td class="nbHitsCovered">&nbsp;49</td>
  <td class="src"><pre class="src">&nbsp;         <span class="keyword">if</span> (interceptor != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;534</td>
  <td class="nbHitsCovered">&nbsp;42</td>
  <td class="src"><pre class="src">&nbsp;            interceptor.beforeRead(operation, ids, search);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;535</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;536</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;537</td>
  <td class="nbHitsCovered">&nbsp;49</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;538</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;539</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> <span class="keyword">void</span> afterRead(String operation, Class&lt;?&gt; type, Serializable[] ids, Search search, Object[] entities) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;540</td>
  <td class="nbHitsCovered">&nbsp;47</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (type != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;541</td>
  <td class="nbHitsCovered">&nbsp;47</td>
  <td class="src"><pre class="src">&nbsp;         ReadInterceptor interceptor = readInterceptors.get(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;542</td>
  <td class="nbHitsCovered">&nbsp;47</td>
  <td class="src"><pre class="src">&nbsp;         <span class="keyword">if</span> (interceptor != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;543</td>
  <td class="nbHitsCovered">&nbsp;40</td>
  <td class="src"><pre class="src">&nbsp;            interceptor.afterRead(operation, ids, search, entities);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;544</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;545</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;546</td>
  <td class="nbHitsCovered">&nbsp;47</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;547</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;548</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> <span class="keyword">void</span> beforeWrite(String operation, Class&lt;?&gt; type, Serializable[] ids, Object[] entities) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;549</td>
  <td class="nbHitsCovered">&nbsp;380</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (type != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;550</td>
  <td class="nbHitsCovered">&nbsp;380</td>
  <td class="src"><pre class="src">&nbsp;         WriteInterceptor interceptor = writeInterceptors.get(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;551</td>
  <td class="nbHitsCovered">&nbsp;380</td>
  <td class="src"><pre class="src">&nbsp;         <span class="keyword">if</span> (interceptor != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;552</td>
  <td class="nbHitsCovered">&nbsp;301</td>
  <td class="src"><pre class="src">&nbsp;            interceptor.beforeWrite(operation, ids, entities);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;553</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;554</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;555</td>
  <td class="nbHitsCovered">&nbsp;380</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;556</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;557</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">protected</span> <span class="keyword">void</span> afterWrite(String operation, Class&lt;?&gt; type, Serializable[] ids, Object[] entities, <span class="keyword">int</span> changes) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;558</td>
  <td class="nbHitsCovered">&nbsp;378</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (type != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;559</td>
  <td class="nbHitsCovered">&nbsp;378</td>
  <td class="src"><pre class="src">&nbsp;         WriteInterceptor interceptor = writeInterceptors.get(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;560</td>
  <td class="nbHitsCovered">&nbsp;378</td>
  <td class="src"><pre class="src">&nbsp;         <span class="keyword">if</span> (interceptor != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;561</td>
  <td class="nbHitsCovered">&nbsp;299</td>
  <td class="src"><pre class="src">&nbsp;            interceptor.afterWrite(operation, ids, entities, changes);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;562</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;563</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;564</td>
  <td class="nbHitsCovered">&nbsp;378</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;565</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;566</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">// ********* PUBLIC methods ****************</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;567</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;568</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;569</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/* (non-Javadoc)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;570</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @see org.sakaiproject.genericdao.api.GenericDao#getPersistentClasses()</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;571</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;572</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">public</span> List&lt;Class&lt;?&gt;&gt; getPersistentClasses() {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;573</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">return</span> <span class="keyword">new</span> ArrayList&lt;Class&lt;?&gt;&gt;(classes);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;574</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;575</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;576</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/* (non-Javadoc)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;577</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @see org.sakaiproject.genericdao.api.GenericDao#invokeTransactionalAccess(java.lang.Runnable)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;578</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;579</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">public</span> <span class="keyword">void</span> invokeTransactionalAccess(Runnable toinvoke) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;580</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;      toinvoke.run();</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;581</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   }</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;582</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;583</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/* (non-Javadoc)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;584</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @see org.sakaiproject.genericdao.api.GenericDao#findById(java.lang.Class, java.io.Serializable)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;585</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;586</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   @SuppressWarnings(<span class="string">"unchecked"</span>)</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;587</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">public</span> &lt;T&gt; T findById(Class&lt;T&gt; type, Serializable id) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;588</td>
  <td class="nbHitsCovered">&nbsp;18</td>
  <td class="src"><pre class="src">&nbsp;      checkClass(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;589</td>
  <td class="nbHitsCovered">&nbsp;18</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (id == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;590</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"id must be set to find persistent object"</span>);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;591</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;592</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;593</td>
  <td class="nbHitsCovered">&nbsp;18</td>
  <td class="src"><pre class="src">&nbsp;      T entity = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;594</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      <span class="comment">// check cache first</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;595</td>
  <td class="nbHitsCovered">&nbsp;18</td>
  <td class="src"><pre class="src">&nbsp;      String key = id.toString();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;596</td>
  <td class="nbHitsCovered">&nbsp;18</td>
  <td class="src"><pre class="src">&nbsp;      String cacheName = getCacheName(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;597</td>
  <td class="nbHitsCovered">&nbsp;18</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (getCacheProvider().exists(cacheName, key)) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;598</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;         entity = (T) getCacheProvider().get(cacheName, key);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;599</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;600</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         <span class="comment">// not in cache so go to the DB</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;601</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   </pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;602</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         <span class="comment">// before interceptor</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;603</td>
  <td class="nbHitsCovered">&nbsp;18</td>
  <td class="src"><pre class="src">&nbsp;         String operation = <span class="string">"findById"</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;604</td>
  <td class="nbHitsCovered">&nbsp;18</td>
  <td class="src"><pre class="src">&nbsp;         beforeRead(operation, type, <span class="keyword">new</span> Serializable[] {id}, <span class="keyword">null</span>);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;605</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   </pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;606</td>
  <td class="nbHitsCovered">&nbsp;18</td>
  <td class="src"><pre class="src">&nbsp;         entity = baseFindById(type, id);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;607</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   </pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;608</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         <span class="comment">// now put the item in the cache</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;609</td>
  <td class="nbHitsCovered">&nbsp;18</td>
  <td class="src"><pre class="src">&nbsp;         getCacheProvider().put(cacheName, key, entity);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;610</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   </pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;611</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         <span class="comment">// after interceptor</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;612</td>
  <td class="nbHitsCovered">&nbsp;18</td>
  <td class="src"><pre class="src">&nbsp;         afterRead(operation, type, <span class="keyword">new</span> Serializable[] {id}, <span class="keyword">null</span>, <span class="keyword">new</span> Object[] {entity});</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;613</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;614</td>
  <td class="nbHitsCovered">&nbsp;18</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">return</span> entity;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;615</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;616</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;617</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/* (non-Javadoc)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;618</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @see org.sakaiproject.genericdao.api.modifiers.BasicModifier#create(java.lang.Object)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;619</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;620</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">public</span> <span class="keyword">void</span> create(Object object) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;621</td>
  <td class="nbHitsCovered">&nbsp;354</td>
  <td class="src"><pre class="src">&nbsp;      Class&lt;?&gt; type = findClass(object);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;622</td>
  <td class="nbHitsCovered">&nbsp;354</td>
  <td class="src"><pre class="src">&nbsp;      checkClass(type);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;623</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;624</td>
  <td class="nbHitsCovered">&nbsp;354</td>
  <td class="src"><pre class="src">&nbsp;      String operation = <span class="string">"create"</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;625</td>
  <td class="nbHitsCovered">&nbsp;354</td>
  <td class="src"><pre class="src">&nbsp;      beforeWrite(operation, type, <span class="keyword">null</span>, <span class="keyword">new</span> Object[] {object});</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;626</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;627</td>
  <td class="nbHitsCovered">&nbsp;354</td>
  <td class="src"><pre class="src">&nbsp;      Serializable idValue = baseCreate(type, object);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;628</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;629</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      <span class="comment">// clear the search caches</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;630</td>
  <td class="nbHitsCovered">&nbsp;353</td>
  <td class="src"><pre class="src">&nbsp;      getCacheProvider().clear(getSearchCacheName(type));</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;631</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;632</td>
  <td class="nbHitsCovered">&nbsp;353</td>
  <td class="src"><pre class="src">&nbsp;      afterWrite(operation, type, <span class="keyword">new</span> Serializable[] {idValue}, <span class="keyword">new</span> Object[] {object}, 1);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;633</td>
  <td class="nbHitsCovered">&nbsp;353</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;634</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;635</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/* (non-Javadoc)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;636</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @see org.sakaiproject.genericdao.api.modifiers.BasicModifier#update(java.lang.Object)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;637</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;638</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">public</span> <span class="keyword">void</span> update(Object object) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;639</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      Class&lt;?&gt; type = findClass(object);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;640</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      checkClass(type);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;641</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;642</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      Serializable idValue = baseGetIdValue(object);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;643</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (idValue == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;644</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;         <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"Could not get an id value from the supplied object, cannot update without an id: "</span> + object);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;645</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;646</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;647</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      String operation = <span class="string">"update"</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;648</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      beforeWrite(operation, type, <span class="keyword">new</span> Serializable[] {idValue}, <span class="keyword">new</span> Object[] {object});</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;649</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;650</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      baseUpdate(type, idValue, object);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;651</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;652</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      <span class="comment">// clear the search caches</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;653</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      getCacheProvider().clear(getSearchCacheName(type));</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;654</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      <span class="comment">// clear the cache entry since this was updated</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;655</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      String key = idValue.toString();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;656</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      String cacheName = getCacheName(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;657</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      getCacheProvider().remove(cacheName, key);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;658</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;659</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;      afterWrite(operation, type, <span class="keyword">new</span> Serializable[] {idValue}, <span class="keyword">new</span> Object[] {object}, 1);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;660</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;661</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;662</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/* (non-Javadoc)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;663</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @see org.sakaiproject.genericdao.api.modifiers.BasicModifier#save(java.lang.Object)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;664</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;665</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">public</span> <span class="keyword">void</span> save(Object object) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;666</td>
  <td class="nbHitsCovered">&nbsp;50</td>
  <td class="src"><pre class="src">&nbsp;      Serializable id = baseGetIdValue(object);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;667</td>
  <td class="nbHitsCovered">&nbsp;49</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (id == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;668</td>
  <td class="nbHitsCovered">&nbsp;47</td>
  <td class="src"><pre class="src">&nbsp;         create(object);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;669</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;670</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;         update(object);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;671</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;672</td>
  <td class="nbHitsCovered">&nbsp;49</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;673</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;674</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/* (non-Javadoc)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;675</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @see org.sakaiproject.genericdao.api.modifiers.BasicModifier#delete(java.lang.Object)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;676</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;677</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">public</span> <span class="keyword">void</span> delete(Object object) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;678</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;      Class&lt;?&gt; type = findClass(object);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;679</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;      Serializable id = baseGetIdValue(object);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;680</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;      delete(type, id);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;681</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;682</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;683</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   <span class="comment">/* (non-Javadoc)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;684</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    * @see org.sakaiproject.genericdao.api.modifiers.BasicModifier#delete(java.lang.Class, java.io.Serializable)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;685</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">    */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;686</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;   <span class="keyword">public</span> &lt;T&gt; <span class="keyword">boolean</span> delete(Class&lt;T&gt; type, Serializable id) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;687</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      checkClass(type);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;688</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;689</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      String operation = <span class="string">"delete"</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;690</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      beforeWrite(operation, type, <span class="keyword">new</span> Serializable[] {id}, <span class="keyword">null</span>);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;691</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;692</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">boolean</span> removed = baseDelete(type, id);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;693</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;694</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">if</span> (removed) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;695</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         <span class="comment">// clear the search caches</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;696</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;         getCacheProvider().clear(getSearchCacheName(type));</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;697</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         <span class="comment">// clear this from the cache</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;698</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;         String key = id.toString();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;699</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;         String cacheName = getCacheName(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;700</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;         getCacheProvider().remove(cacheName, key);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;701</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;         </pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;702</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;         afterWrite(operation, type, <span class="keyword">new</span> Serializable[] {id}, <span class="keyword">null</span>, 1);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;703</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;      }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;704</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;      <span class="keyword">return</span> removed;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;705</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;   }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;706</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;707</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;}</pre></td>
</tr>
</table>
<div class="footer">
Reports generated by <a href="http://cobertura.sourceforge.net/" target="_top">Cobertura</a>.
</div>
</body>
</html>
